<template>
    <div>
        <h1>这是APP.vue根组件</h1>
        <hr>
        <!-- <my-count count="abc" state="3"></my-count> -->
         <my-count :count="count" :state="true" info="abc" type="danger" v-model:from="isState"></my-count>

         <p>{{ isState }}</p>
         <button v-on:click="change">改变from的值</button>
    </div>
</template>
<script>
import MyCount from './count.vue'
export default {
    name:'MyApp',
    data() {
        return {
            count: 12,
            isState: 'abc'
        }
    },
    components:{
        MyCount
    },
    methods: {
        change() {
            alert(`读取到了${this.isState}` )
            this.isState = '123'
         }
    }
}
</script>
